<template>
  <div class="logo-box" @click="router().push({name:'list'})">
    <img class="logo" src="../../assets/img/logo.svg" alt="logo">
    <h3>水果小站</h3>
  </div>
</template>

<script>
import router from "@/router";

export default {
  name: "Logo",
  methods: {
    router() {
      return router
    }
  }
};
</script>

<style scoped>
.logo-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  user-select: none;
  align-items: center;
  cursor: pointer;
}

.logo {
  width: 40px;
  height: 40px;
}

h3 {
  font-size: 23px;
  margin: 0 5px;
}
</style>